package com.chixing.day04_oop.work;

//账户类
public class Account {
    //账号
    private String accountId;
    //密码
    private String accountPassword;
    //余额
    private Integer accountBalance;

    //存款
    public void deposit(int money){
        this.accountBalance+=money;
        System.out.println("存款成功，当前余额为: "+this.getAccountBalance());
    }

    //取款
    public void withdraw(int money){
        this.accountBalance-=money;
        System.out.println("取款成功，当前余额为: "+this.getAccountBalance());
    }

    public Account(String accountId, String accountPassword, Integer accountBalance) {
        this.accountId = accountId;
        this.accountPassword = accountPassword;
        this.accountBalance = accountBalance;
    }

    public Account() {
    }

    public String getAccountId() {
        return accountId;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    public String getAccountPassword() {
        return accountPassword;
    }

    public void setAccountPassword(String accountPassword) {
        this.accountPassword = accountPassword;
    }

    public Integer getAccountBalance() {
        return accountBalance;
    }

    public void setAccountBalance(Integer accountBalance) {
        this.accountBalance = accountBalance;
    }

//    @Override
//    public String toString() {
//        return "Account{" +
//                "accountId='" + accountId + '\'' +
//                ", accountPassword='" + accountPassword + '\'' +
//                ", accountBalance=" + accountBalance +
//                '}';
//    }
}
